package com.zking.util;


import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @class Result.java
 * @date 2015年9月22日 上午11:50
 * @description 返回结果封装类
 */
public class Result {
	public String code;// 状态码，true:成功，false:失败，error：错误,info:日志
	public Map<String, Object> result;

	public Result() {
		result = new HashMap<String, Object>();
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public void addList(List<?> list) {
		this.result.put("list", list);
	}

	public void addMsg(String msg) {
		this.result.put("msg", msg);
	}

	public void addObject(Object object) {
		this.result.put("obj", object);
	}

	public void addOther(String key, Object object) {
		this.result.put(key, object);
	}

	public Map<String, Object> getResult() {
		return result;
	}

	public void setResult(Map<String, Object> result) {
		this.result = result;
	}


}
